﻿using PwjCy.Lite.EntityLite;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PwjCy.Lite.Persistence
{
    /// <summary>
    /// 持久层
    /// </summary>
    public interface IPersister
    {
        /// <summary>
        /// 保存对象
        /// </summary>
        /// <param name="pwjcyObject">DAO对象</param>
        /// <returns>保存结果</returns>
        bool Save(IPwjCyObject pwjcyObject);

        /// <summary>
        /// 根据Id获取PwjCyObject对象
        /// </summary>
        /// <param name="storageAlias">数据库存储别名</param>
        /// <param name="t">DAO对象类型</param>
        /// <param name="Id">主键Id</param>
        /// <returns></returns>
        IPwjCyObject LoadPwjCyObject(string storageAlias, Type t, object Id);
    }
}
